home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / bok-bndr.hqx / Bookbinder / card_7452.txt < prev    next >
Text File  |  1991-06-04  |  6KB  |  304 lines

  1. -- card: 7452 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 4755
  5. -- name: index (cont)
  6. ----- HyperTalk script -----
  7. on updateIndex
  8.   global deletedCard
  9.   put 36*((the number of me)-(the number of card "index")) into base
  10.   set cursor to watch
  11.   put 1 into x
  12.   repeat until x > 18
  13.     get line x+base of card field "topic" of card "index"
  14.     if it is not "" then
  15.       if x > 1 then
  16.         if it is line x+base-1 of card field "topic" of card "index" then
  17.           get ""
  18.         end if
  19.       end if
  20.       put it into line x of card field "item" of card (the number of me)
  21.       get line x+base of card field "card id" of card "index"
  22.       if it is word 3 of deletedCard then
  23.         delete line x+base of card field "topic" of card "index"
  24.         delete line x+base of card field "card id" of card "index"
  25.         subtract 1 from x
  26.       else
  27.         get idToNumber(it)
  28.         put it into line x of card field "page" of card (the number of me)
  29.       end if
  30.     else
  31.       put "" into line x of card field "item" of card (the number of me)
  32.       put "" into line x of card field "page" of card (the number of me)
  33.     end if
  34.     add 1 to x
  35.   end repeat
  36.   put 1 into x
  37.   repeat until x > 18
  38.     get line x+18+base of card field "topic" of card "index"
  39.     if it is not "" then
  40.       if x > 1 then
  41.         if it is line x+base+17 of card field "topic" of card "index" then
  42.           get ""
  43.         end if
  44.       end if
  45.       put it into line x of card field "item2" of card (the number of me)
  46.       get line x+base+18 of card field "card id" of card "index"
  47.       if it is word 3 of deletedCard then
  48.         delete line x+18+base of card field "topic" of card "index"
  49.         delete line x+18+base of card field "card id" of card "index"
  50.         subtract 1 from x
  51.       else
  52.         get idToNumber(it)
  53.         put it into line x of card field "page2" of card (the number of me)
  54.       end if
  55.     else
  56.       put "" into line x of card field "item2" of card (the number of me)
  57.       put "" into line x of card field "page2" of card (the number of me)
  58.     end if
  59.     add 1 to x
  60.   end repeat
  61.   put (the number of me) + 1 into nextCard
  62.   if nextCard <= the number of cards then
  63.     get the name of card nextCard
  64.     get word 2 of it
  65.     get char 2 to 6 of it
  66.     if it is "index" then
  67.       send updateIndex to card nextCard
  68.     end if
  69.   end if
  70. end updateIndex
  71.  
  72.  
  73.  
  74.  
  75. -- part 14 (button)
  76. -- low flags: 00
  77. -- high flags: 0000
  78. -- rect: left=7 top=57 right=300 bottom=502
  79. -- title width / last selected line: 0
  80. -- icon id / first selected line: 0 / 0
  81. -- text alignment: 1
  82. -- font id: 0
  83. -- text size: 12
  84. -- style flags: 0
  85. -- line height: 16
  86. -- part name: 
  87.  
  88.  
  89. -- part 5 (field)
  90. -- low flags: 01
  91. -- high flags: 0000
  92. -- rect: left=14 top=60 right=300 bottom=182
  93. -- title width / last selected line: 0
  94. -- icon id / first selected line: 0 / 0
  95. -- text alignment: 0
  96. -- font id: 2
  97. -- text size: 10
  98. -- style flags: 0
  99. -- line height: 13
  100. -- part name: item
  101.  
  102.  
  103. -- part 6 (field)
  104. -- low flags: 01
  105. -- high flags: 0000
  106. -- rect: left=14 top=60 right=300 bottom=234
  107. -- title width / last selected line: 0
  108. -- icon id / first selected line: 0 / 0
  109. -- text alignment: 65535
  110. -- font id: 2
  111. -- text size: 10
  112. -- style flags: 0
  113. -- line height: 13
  114. -- part name: page
  115. ----- HyperTalk script -----
  116. on mousedown
  117.   set lockScreen to true
  118.   set lockText of me to false
  119.   click at the clickLoc
  120.   click at the clickLoc
  121.   get the selection
  122.   set lockText of me to true
  123.   set lockScreen to false
  124.   if it is not "" then
  125.     push card
  126.     global xrefdepth
  127.     add 1 to xrefdepth
  128.     visual iris open
  129.     show background button "return"
  130.     go card it
  131.   else
  132.     select empty
  133.   end if
  134. end mouseDown
  135.  
  136.  
  137. -- part 1 (button)
  138. -- low flags: 00
  139. -- high flags: A003
  140. -- rect: left=366 top=26 right=43 bottom=467
  141. -- title width / last selected line: 0
  142. -- icon id / first selected line: 0 / 0
  143. -- text alignment: 1
  144. -- font id: 0
  145. -- text size: 12
  146. -- style flags: 0
  147. -- line height: 16
  148. -- part name: Add Index Pg.
  149. ----- HyperTalk script -----
  150. on mouseUp
  151.   put the userLevel into currentLevel
  152.   set the userLevel to 5
  153.   doMenu "Copy Card"
  154.   doMenu "Paste Card"
  155.   put "" into field "page no"
  156.   send updateIndex to this card
  157.   set the userLevel to currentLevel
  158. end mouseUp
  159.  
  160.  
  161.  
  162. -- part 10 (field)
  163. -- low flags: 01
  164. -- high flags: 0000
  165. -- rect: left=274 top=60 right=300 bottom=442
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 0
  169. -- font id: 2
  170. -- text size: 10
  171. -- style flags: 0
  172. -- line height: 13
  173. -- part name: item2
  174.  
  175.  
  176. -- part 9 (field)
  177. -- low flags: 01
  178. -- high flags: 0000
  179. -- rect: left=274 top=60 right=300 bottom=494
  180. -- title width / last selected line: 0
  181. -- icon id / first selected line: 0 / 0
  182. -- text alignment: 65535
  183. -- font id: 2
  184. -- text size: 10
  185. -- style flags: 0
  186. -- line height: 13
  187. -- part name: page2
  188. ----- HyperTalk script -----
  189. on mousedown
  190.   set lockScreen to true
  191.   set lockText of me to false
  192.   click at the clickLoc
  193.   click at the clickLoc
  194.   get the selection
  195.   set lockText of me to true
  196.   set lockScreen to false
  197.   if it is not "" then
  198.     push card
  199.     global xrefdepth
  200.     add 1 to xrefdepth
  201.     visual iris open
  202.     show background button "return"
  203.     go card it
  204.   else
  205.     select empty
  206.   end if
  207. end mouseDown
  208.  
  209.  
  210. -- part contents for background part 7
  211. ----- text -----
  212. 20
  213.  
  214. -- part contents for background part 6
  215. ----- text -----
  216. Index (cont.)
  217.  
  218. -- part contents for card part 5
  219. ----- text -----
  220. scripts
  221. Shafer, Dan
  222.  
  223. user level
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239. -- part contents for card part 6
  240. ----- text -----
  241. 15
  242. 4
  243. 17
  244. 4
  245. 15
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260. -- part contents for card part 9
  261. ----- text -----
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281. -- part contents for card part 10
  282. ----- text -----
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302. -- part contents for background part 17
  303. ----- text -----
  304. p6